package cn.itcast.jobs;

import cn.itcast.interfaces.ClearService;
import cn.itcast.pojo.Result;
import cn.itcast.utils.DateUtils;
import com.alibaba.dubbo.config.annotation.Reference;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

/**
 * @author: peterChen
 * @date: 2019/8/22 15:08
 * @description: TODO
 * @version: 1.0
 */
@Slf4j
public class ClearOrderSetting {
    @Reference
    private ClearService clearService;

    public void clearOrderSetting(){
        try {
            clearService.clearOrderSettingBeforeDate(DateUtils.getToday());
            log.debug("clear orderSetting by month success");
        } catch (Exception e) {
            //e.printStackTrace();
            log.error("clear ordersetting by month error.",e);
        }

    }


}
